import java.util.Scanner;

public class Practice1112 {
    //奇数位上全是奇数或者偶数位上全是偶数
    public static void main(String[] args) {
        int[] arr={1,2,4};
        oddInOddEvenInEven(arr);
        for (int i = 0; i <arr.length ; i++) {
            System.out.println(arr[i]);
        }
    }
    private static void oddInOddEvenInEven1(int[] arr) {
        int[] tmp=new int[arr.length];
        for(int i=0;i<arr.length;i++){
            tmp[i]=arr[i];
        }
        for(int i=0;i<arr.length;i++){
            if(tmp[i]%2==0&&i%2!=0){
                arr[i-1]=tmp[i];
            }else if(tmp[i]%2!=0&&i%2==0){
                arr[i+1]=tmp[i];
            }
        }
    }
    public  static void oddInOddEvenInEven(int[] arr) {
        int m=0;
        int n=1;
        int len=arr.length;
        if((len-1)%2==0){
            while(m<len){
                if(arr[m]%2==0||arr[n]%2!=0){
                    m+=2;
                    n+=2;
                }else{
                    int tmp=arr[m];
                    arr[m]=arr[n];
                    arr[n]=tmp;
                }
            }
        }else{
            while(n<len){
                if(arr[m]%2==0||arr[n]%2!=0){
                    m+=2;
                    n+=2;
                }else{
                    int tmp=arr[m];
                    arr[m]=arr[n];
                    arr[n]=tmp;
                }
            }
        }
    }
    //猴子分桃
    public static void main49(String[] args){
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()){
            double n = scan.nextInt();
            if(n==0){
                break;
            }else{
                long sum=(long) Math.pow(5,n)-4;
                long get=(long) (Math.pow(4,n)+n-4);
                System.out.println(sum+" "+get);
            }
        }
    }
}
